﻿ *<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="wangpanindex.aspx.cs" Inherits="FPC.Offer.UI.SkyDrive.wangpanindex" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <meta charset="utf-8"/>
    <meta name="renderer" content="webkit|ie-comp|ie-stand"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
    <meta http-equiv="Cache-Control" content="no-siteapp" />
    <link href="../H-ui/static/h-ui/css/H-ui.min.css" rel="stylesheet" />
    <link href="../H-ui/static/h-ui.admin/css/H-ui.admin.css" rel="stylesheet" />
    <link href="../H-ui/Lib/Hui-iconfont/1.0.8/iconfont.css" rel="stylesheet" />
    <link href="../H-ui/static/h-ui.admin/skin/default/skin.css" rel="stylesheet" />
    <link href="../H-ui/static/h-ui.admin/css/style.css" rel="stylesheet" />
    <title>网盘</title>
</head>
<body>
       <div class="cl pd-5 bg-1 bk-gray mt-20" > <span class="l"><a  href="javascript:; style="margin-right:20px"" onclick="shangchuan('上传文件', 'file.aspx', '', '510')"  class="btn btn-danger radius" style="margin-right:20px"><i class="Hui-iconfont">&#xe600;</i> 上传文件</a></span>
        <span class="l"><a id="bt" href="javascript:;" onclick="wenjian(bt)" class="btn btn-primary radius" style="margin-right:20px"><i class="Hui-iconfont"></i> 新建文件夹</a></span>
        <span class="l"><a href="javascript:;" onclick="xiazai('离线下载', 'xiazai.aspx', '', '510')" class="btn btn-primary radius" style="margin-right:20px"><i class="Hui-iconfont"></i> 离线下载</a></span>
    
    </div>
    <div class="page-container">
     
        <div class="cl pd-5 bg-1 bk-gray mt-20">
            
         
        </div>
        <div class="mt-20">
            <table class="table table-border table-bordered table-hover table-bg table-sort">
                <thead>
                    <tr">
                        <th width="50"></th>
                        <th >文件名称</th>                     
                      
                        <th>创建日期</th>
                        <th>操作</th>
                    </tr>
                </thead>
          
                    <tr>
                        <td></td>
                        <td id="ta"></td>
                        <td></td>
                        
                        <td></td>
                    </tr>
           
                  
                 
                  
               
                <tbody id="tr">

                </tbody>
                  <tbody id="tc">
                 
                   
                    

                   
                
                </tbody> 
            </table>
       
        </div>
    </div>
  

    <!--_footer 作为公共模版分离出去-->
  
    <script src="../H-ui/Lib/jquery/1.9.1/jquery.min.js"></script>
    <script src="../H-ui/Lib/layer/2.4/layer.js"></script>
    <script src="../H-ui/static/h-ui/js/H-ui.js"></script>
    <script src="../H-ui/static/h-ui.admin/js/H-ui.admin.js"></script>
    <!--/_footer 作为公共模版分离出去-->
    <!--请在下方写此页面业务相关的脚本-->
    <script src="../H-ui/Lib/My97DatePicker/4.8/WdatePicker.js"></script>
    <script src="../H-ui/Lib/datatables/1.10.0/jquery.dataTables.min.js"></script>
    <script src="../H-ui/Lib/laypage/1.2/laypage.js"></script>
    <script>

       <%-- <%=Session[FPC.Offer.Common.SystemKeys.COOKIE_USER_UserID_REMEMBER]%>--%>

        //首次加载创建警员id文件夹
        $(function () {

            $.ajax({


                type: "post",
                url: "/GeneralProcessor/SkyDriveHand/IndexAddHandler.ashx",
                data: {
                    name: "<%=Session[FPC.Offer.Common.SystemKeys.COOKIE_USER_UserID_REMEMBER]%>",


                },
                successs: function (mes) {
                    if (mes > 0) {
                        alert("创建成功")

                    }
                    else {

                        alert("创建失败")

                    }


                }



            })

            //根据警员id显示子文件
            $.ajax({

                type: "post",
                url: "../GeneralProcessor/SkyDriveHand/NetTrayshowHandler.ashx",
                data: {

                    name: "<%=Session[FPC.Offer.Common.SystemKeys.COOKIE_USER_UserID_REMEMBER]%>",
                },
                success: function (mes) {

                    var item = JSON.parse(mes);

                    var tr = "";
                    $(item).each(function (i, item) {


                        tr += " <tr class='text-c'><td></td><td class='text-l'><img src='image/1.png' /><a href='Subfolder.aspx?name=" + item.FileName + "'>" + item.FileName + "<a></td><td>" + item.FileDate + "</td><td class='f-14'><a title='删除' href='javascript:;' onclick='del(" + item.NeiTrayId + ")' class='ml-5' style='text-decoration:none'><i class='Hui-iconfont'>&#xe6e2;</i></a></td></tr>"


                    })
                    $("#tr").append(tr);
                }
            })


        })
        //删除文件去回收站
        function del(a) {

            $.ajax({
                type: "post",
                url: "/GeneralProcessor/SkyDriveHand/DelTableHandler.ashx",
                data: {
                    id: a,

                },
                success: function (mes) {
                    if (mes > 0) {
                        location.reload();
                    }
                    else {
                        alert("删除失败"); location.reload();

                    }


                }

            })



        }




        function shangchuan(title, url, w, h) {

            layer_show(title, url, w, h);
        }
        function xiazai(title, url, w, h) {

            layer_show(title, url, w, h);
        }
        function wenjian(obj) {
            
            
                var i = "<form action='/GeneralProcessor/SkyDriveHand/AddNetTrayHandler.ashx' ><div><img src='image/1.png' /><input id='Text1' type='text' name='FileName' value='新建文件夹' /><a title='确认'><input type='submit'  class='Hui-iconfont' value='&#xe6e1'/></a><a title='取消'><input type='reset'  class='Hui-iconfont' value='&#xe6dd'/></a></form>";
                $('#ta').append(i);
            

          

        }




    </script>
  
</body>
</html>
